PRINT

Syntax: PRINT [#chan,] { [separator] [strg$ separator] var }
    or: PRINT { [#chan,] [separator] [strg$ separator] var }
        (THOR XVI & Minerva v1.97+ only)
Location: QL ROM

This command will send a string of bytes to the specified channel (default #1). If any variables (var) are specified, the contents of those variables are PRINTed in the specified channel.  If the channel is a window, the characters printed appear at the current text cursor position, in the current INK colour on the current STRIP colour, and will also be affected by the settings of CSIZE, UNDER, FLASH and OVER.

If you tell PRINT to use an unset variable, an asterisk ('*') will be PRINTed on screen rather than an error being reported (except on SMS where an unset variable is given the value 0 (if a numeric variable) or '' for a string).

If a channel is specified, this must be followed by a comma. It may however also be followed by one or more separators, as with INPUT. At the end of the PRINT command, the text cursor is placed at the start of the next print line (unless an end separator of '!', '\' or ';' is used).

When using a separator of '!', TO or ',' on a non-window channel, the PRINT statement will always assume the end of each line to be the number of characters specified with the WIDTH command, thus allowing you to format your output on a printer, for example.

PRINT #ch!!txt$(1 TO I%-1)!

Note:
Minerva v1.97+ and the THOR XVI (v6.41+) allow you to put channel numbers part way through a statement, for example:

PRINT 'Name:'!name$ \#0; 'Address:' !address$

instead of:      

PRINT 'Name '!name$ : PRINT #0;'Address:'!address$

CROSS-REFERENCE:
See also INPUT which contains a description of the different types of separators.  
Please also see WIDTH.  
VG_PRINT allows you to print using scaleable fonts on screen.
CHAR_USE and CHAR_DEF allow you to alter the fonts used for printing characters on screen.
